/*
* Copyright (c) 2020 - 2025 Renesas Electronics Corporation and/or its affiliates
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include "hw_sce_ra_private.h"

void HW_SCE_p_func043 (void)
{
    WR1_PROG(REG_A0H, 0x00010000U);

    HW_SCE_p_func100(0x59a3c2c5U, 0x13732de0U, 0x35332b22U, 0xea0dddd9U);
    WR1_PROG(REG_B0H, 0x000018b8U);
    WR1_PROG(REG_D0H, 0x08000085U);
    WR1_PROG(REG_00H, 0x00430011U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    HW_SCE_p_func100(0x69c8b1b2U, 0xe50345e1U, 0x9be36b6cU, 0xd923a03eU);
    WR1_PROG(REG_D0H, 0x08000095U);
    WR1_PROG(REG_00H, 0x00430011U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    HW_SCE_p_func100(0x1ac9d401U, 0x53e0f859U, 0x27570086U, 0xab75570bU);

    WR1_PROG(REG_D0H, 0x080000c5U);
    WR1_PROG(REG_B0H, 0x000008b3U);
    WR1_PROG(REG_00H, 0x00430009U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);
    WR1_PROG(REG_B0H, 0x000008b4U);
    WR1_PROG(REG_00H, 0x00430009U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    WR1_PROG(REG_D0H, 0x0b040104U);
    WR1_PROG(REG_9CH, 0x810100c0U);
    WR1_PROG(REG_00H, 0x00490005U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    WR1_PROG(REG_94H, 0x000008c6U);

    WR1_PROG(REG_9CH, 0x80840006U);
    WR1_PROG(REG_00H, 0x03410011U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    WR1_PROG(REG_94H, 0x00003846U);
    WR1_PROG(REG_94H, 0x00008c40U);
    WR1_PROG(REG_94H, 0x00ffffffU);
    WR1_PROG(REG_94H, 0x00009040U);
    WR1_PROG(REG_94H, 0x01000000U);
    WR1_PROG(REG_94H, 0x00003c46U);

    WR1_PROG(REG_D4H, 0x40000000U);
    WR1_PROG(REG_D0H, 0x30009105U);
    WR1_PROG(REG_9CH, 0x81840006U);
    WR1_PROG(REG_00H, 0x00490011U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    WR1_PROG(REG_94H, 0x00008c40U);
    WR1_PROG(REG_94H, 0x00ffffffU);
    WR1_PROG(REG_94H, 0x00009040U);
    WR1_PROG(REG_94H, 0x02000000U);
    WR1_PROG(REG_94H, 0x00003c46U);

    WR1_PROG(REG_D4H, 0x40000000U);
    WR1_PROG(REG_D0H, 0x30009045U);
    WR1_PROG(REG_9CH, 0x81840006U);
    WR1_PROG(REG_00H, 0x00490011U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    HW_SCE_p_func100(0x2b606db4U, 0xd3e66ad5U, 0xee3b4d15U, 0x2274f27dU);
    WR1_PROG(REG_D0H, 0x08000085U);
    WR1_PROG(REG_00H, 0x00410011U);
    WAIT_STS(REG_04H, 30, 0);
    WR1_PROG(REG_40H, 0x00001800U);

    HW_SCE_p_func100(0x16e4d947U, 0xe5f4c0c4U, 0x3e438ba4U, 0xf5b079abU);
    WR1_PROG(REG_14H, 0x000000a1U);
    WR1_PROG(REG_D0H, 0x0c000094U);
    WAIT_STS(REG_14H, 31, 1);
    WR1_PROG(REG_2CH, change_endian_long(0x00000000U));

    WR1_PROG(REG_94H, 0x00007c07U);
    WR1_PROG(REG_40H, 0x00602000U);
}
